package com.park.mer.controller.meruser;

import cn.hutool.crypto.SecureUtil;
import com.park.controller.BaseController;
import com.park.entity.mer.MerUserInfo;
import com.park.entity.mer.MerUserInfoDto;
import com.park.entity.mer.MerUserInfoLoginDto;
import com.park.mer.service.meruser.MerUserService;
import com.park.response.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 * @title: MerController
 * @projectName park
 * @description: 微信商户端登录
 * @date 2020/5/412:33
 */
@RestController
@RequestMapping(value = "/wx/meruser")
public class MerUserController extends BaseController {

    @Autowired
    private MerUserService merUserService;

    /**
     * 商户用户登录
     * @param merUserInfoLoginDto
     * @return
     */
    @RequestMapping(value = "/login",method = RequestMethod.POST)
    public Result merLogin(@RequestBody MerUserInfoLoginDto merUserInfoLoginDto){
        MerUserInfoDto merUserInfo = merUserService.merLogin(merUserInfoLoginDto);
        return SUCCESS(merUserInfo);
    }

}
